#pragma once

#include <windows.h>
#include <mutex>
#include <condition_variable>
#include "MallocChest.h"

class MallocShare : public MallocChest
{
	/** Critical section for ThreadList */
	std::mutex mThreadsCritical;

public:

	static MallocShare& Get();

	MallocShare() {};
	virtual ~MallocShare() {}

	virtual void* Malloc(uint32 count, uint32 alignment = DEFAULT_ALIGNMENT) override;


	virtual void* Realloc(void* original, uint32 count, uint32 alignment = DEFAULT_ALIGNMENT) override;


	virtual void Free(void* original) override;

};